#define   osObjectsPublic                                       // define objects in rtxapp module
#include "osObjects.h"                                          // RTOS object definitions

void StorageTaskEntry (void const *argument);                                     // thread function
osThreadDef (StorageTask,StorageTaskEntry, osPriorityLow, 0, 1024);                  // thread object

void DispTaskEntry (void const *argument);                                     // thread function
osThreadDef (DispTask,DispTaskEntry, osPriorityLow, 0, 256);                  // thread object

void TestTaskEntry (void const *argument);                                     // thread function
osThreadDef (TestTask,TestTaskEntry, osPriorityLow, 0, 256);                  // thread object

/*----------------------------------------------------------------------------
 *      Thread 1 'Thread_Name': Sample thread
 *---------------------------------------------------------------------------*/

int Init_Thread (void)
{
    tid_StorageTask = osThreadCreate(osThread(StorageTask), NULL);
    if (!tid_StorageTask) 
        return(-1);
    
    tid_DisplayTask = osThreadCreate(osThread(DispTask), NULL);
    if (!tid_DisplayTask) 
        return(-1);
    
    tid_TestTask = osThreadCreate(osThread(TestTask), NULL);
    if (!tid_TestTask) 
        return(-1);
    
/*
  tid_Thread = osThreadCreate (osThread(Thread), NULL);
  if (!tid_Thread) return(-1);
  
  tid_Display = osThreadCreate (osThread(Display), NULL);
  if (!tid_Display) return(-1);
    
  tid_ComTask = osThreadCreate (osThread(ComTask), NULL);
  if (!tid_ComTask) return(-1);
	
  tid_ComTtlTask = osThreadCreate (osThread(ComTtlTask), NULL);
  if (!tid_ComTtlTask) return(-1);
    
  tid_LedCtrTask = osThreadCreate (osThread(LedCtrTask), NULL);
  if (!tid_LedCtrTask) return(-1);
    
  tid_TempCtrTask = osThreadCreate (osThread(TempCtrTask), NULL);
  if (!tid_TempCtrTask) return(-1);
    
  //tid_Modbus = osThreadCreate (osThread(Modbus), NULL);
  //if (!tid_Modbus) return(-1);	
  */
  return(0);
}

